﻿using System.Data.Entity.ModelConfiguration;

namespace HobSoft.SoccerBet2014.Domain.Models.DbSchema
{
    public class BFCategoryConfiguration : EntityTypeConfiguration<BFMarketCategory>
    {
        public BFCategoryConfiguration(string schema = "dbo")
        {
            ToTable(schema + ".BFMarketCategory");
            HasKey(c => c.ID);
            Property(c => c.ID).HasColumnName("CategoryID").IsRequired();
            Property(c => c.Name).HasColumnName("Description").IsOptional().HasMaxLength(2000);
            Property(c => c.OddsType).HasColumnName("OddsType").IsRequired();
            Property(c => c.Handicap).HasColumnName("[OVal]").IsOptional();
        }
    }
}
